Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rescaling of internal tide debugging code #763

Open
wants to merge 1 commit into
base: dev/gfdl
Choose a base branch
from

Conversation

Hallberg-NOAA
Copy link
Member

Corrected the internal tide rescaling arguments so that some of the debugging variables have units that are consistent with their documented units. This involved changing the scale arguments to global_area_integral() to tmp_scale arguments in 8 places so that the units of the output retain the scaling of the input variable. The multiplication by the reverse of the scaling factor was also added to 4 debugging output messages.

Also replaced the scale argument to 35 chksum() calls with the equivalent but preferred unscale argument, following the pattern elsewhere in the MOM6 code.

All answers are bitwise identical, and only debugging code was modified.

  Corrected the internal tide rescaling arguments so that some of the debugging
variables have units that are consistent with their documented units.  This
involved changing the scale arguments to global_area_integral to tmp_scale
arguments in 8 places so that the units of the output retain the scaling of the
input variable.  The multiplication by the reverse of the scaling factor was
also added to 4 debugging output messages.

  Also replaced the scale argument to 35 chksum calls with the equivalent but
preferred unscale argument, following the pattern elsewhere in the MOM6 code.

  All answers are bitwise identical, and only debugging code was modified.
@awallcraft
Copy link

Pull request #764 notes that MOM_internal_tides.F90 may be defining or calculating frequency incorrectly. So far as I can tell this does not impact the debugging code changed here, but any test cases used to confirm the diagnostics may be able to resolve the frequency issue.

@Hallberg-NOAA
Copy link
Member Author

Hallberg-NOAA commented Nov 30, 2024

The code itself was not incorrect, per se, but it was inconsistent with the descriptions of the units of the debugging diagnostic variables in the comments describing them. The revised code will give equivalent model output, but it is now internally self-consistent with how it is described. I agree that this PR should be essentially independent of the corrections being made in PR #764.

@Hallberg-NOAA Hallberg-NOAA changed the title Fix rescaling of internal tide of debugging code Fix rescaling of internal tide debugging code Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants